<!DOCTYPE html>
<html >
<meta charset="utf-8">
<head >
<#include "/page/include.ftl">

</head>
<body class="white-bg">
	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
		<form class="form-horizontal m" id="form-mq-add">
			<input name="deptId"  type="hidden" id="treeId"/>
			<div class="form-group">
				<label class="col-sm-3 control-label ">源系统名称：</label>
				<div class="col-sm-8">
				    <input class="form-control" type="hidden" name="id" id="id"  value="${id!}">
					<input class="form-control" type="text" id="name" name="name" value="${name!}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">同步类型：</label>
				<div class="col-sm-8">
					<select id="syncType" name="syncType" class="form-control m-b" with="100px">
					       
					       <option value="${syncType!}"><#if syncType=="1">增量同步 <#elseif syncType=="2">全量同步 </#if></option>
			               <option value="1">增量同步</option>
 				           <option value="2">全量同步</option>
	                   
	                </select>
				</div>
			</div>
			
			<div class="form-group">
				<label class="col-sm-3 control-label">请求类型：</label>
				<div class="col-sm-8">
					<select id="methodtype" name="methodtype" class="form-control m-b" with="100px">
				           <option value="${method!}" >${method!}</option>
			               <option value="GET" >GET</option>
 				           <option value="POST">POST</option>
	                   
	                </select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">URL地址：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="url" id="url"  value="${url!}">
				</div>
			</div>

			<div class="form-group">
                        	<label class="col-sm-3 control-label">FORM表单类型：</label>
                        		<div class="col-sm-8">
                        			<select id="formtype" name="formtype" class="form-control m-b" with="100px">
                        			     <option value="${formframte!}">${formframte!}</option>
                        			     <option value="application/x-www-form-urlencoded">application/x-www-form-urlencoded</option>
                         				 <option value="multipart/form-data">multipart/form-data</option>
                         				 <option value="application/json">application/json</option>

                        	        </select>
                        	</div>
                        </div>

			
			<div class="form-group">
				<label class="col-sm-3 control-label">是否批量：</label>
				<div class="col-sm-8">
					<select id="is_batch" name="is_batch" class="form-control m-b" with="100px">
					       <option value="${is_batch!}"><#if is_batch=="1">非批量 <#elseif is_batch=="2">批量 </#if></option>
			               <option value="2">批量</option>
 				           <option value="1">非批量</option>
	                   
	                </select>
				</div>
			</div>

			<div class="form-group">
				<label class="col-sm-3 control-label">系统名称：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="sysname" id="sysname" value="${sysname!}">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">表名称：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="table_name" id="table_name" value="${table_name!}">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">请求参数：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="parameters" id="parameters" value="${parameters!}">
				</div>
			</div>
			
			
			

			
			<div class="form-group">
				<label class="col-sm-3 control-label">定时任务表达式：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="cronexpress" id="cronexpress" value="${cronexpress!}">
				</div>
			</div>
			
			
		</form>
	</div>
	
	<script src="${rc.contextPath}/static/ajax/libs/select/select2.js"></script>


	<script>

	 var prefix = ctx;

        
        



 $("#form-mq-add").validate({
                	onkeyup: false,
                	rules:{
                	    "name":{

                           required:true,
                        },
                		table_name:{
                			required:true,
                		}
                	},
                	messages: {
                        "menuName": {
                            remote: "菜单已经存在"
                        }
                    },
                    focusCleanup: true
                });

                 function submitHandler() {
        	        if ($.validate.form()) {
        	            $.operate.save(prefix + "http/update", $('#form-mq-add').serialize());
        	        }
        	    }
        
		
		
    </script>
</body>
</html>
